// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.css'
import VueResource from 'vue-resource'
//import Swiper from 'swiper'
//import 'swiper/dist/css/swiper.min.css';
//import VueAwesomeSwiper from 'vue-awesome-swiper';


import Login from './components/login/Login'
import Recommend from './components/recommend/Recommend'
import Home from './components/common/Home'
import Movice from './components/movice/Movice'
import MoviceDetails from './components/movice/MoviceDetails'
import Book from './components/book/Book'
import Photo from './components/photo/Photo'

Vue.use(VueMaterial);
Vue.use(VueRouter);
Vue.use(VueResource);
//Vue.use(VueAwesomeSwiper) //记得不要忘记这句
//Vue.use(Swiper);

//路由配置
const router = new VueRouter({
  mode:"history",
  base:__dirname,
  routes:[
    {path:"/",redirect:"/login"},
    {path:"/login",component:Login},
    {
      path:"/home",
      component:Home,
      children:[
        {path:'/home/recommend',component:Recommend},
        {path:'/home/movice',component:Movice},
        {path:'/home/moviceDetails/:id',component:MoviceDetails},
        {path:'/home/book',component:Book},
        {path:'/home/photo',component:Photo}

      ]
    }
  ]
});

//应用主题
Vue.material.registerTheme('default',{
  primary:'cyan',
  accent:'pink'
});

Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
  //el: '#app',
  router,

  template: '<App/>',
  components: { App }
}).$mount("#app")


